﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Media;

namespace GG.Base
{
    public class MoveAble : PositionAble, INeedToGetSomeUpdates
    {
        public static double toRadians = Math.PI / 180;
        public System.Windows.Point Speed
        {
            get;
            set;
        }

        public virtual void WhatImGoingToDoWhenIUpdate()
        {
            System.Windows.Point pos = Position;
            double rotInRadians = Rotation * toRadians;
            //double hSpeed = Math.Sin(rotInRadians) * Speed.Y;
            //double vSpeed = Math.Cos(rotInRadians) * Speed.Y;
            double hSpeed = Speed.X;
            double vSpeed = Speed.Y;
            System.Diagnostics.Debug.WriteLine("hSpeed: " + hSpeed + ", vSpeed;" + vSpeed);
            Position = new System.Windows.Point(pos.X + hSpeed, pos.Y + vSpeed);
        }

    }
}